I'm doing a pocket pc application. There's only a picture box cause i cannot make an mdi form.
The application must open big .tiff image like 7/8 MB
This is the code that open the image (i hope
-PrimeRecente and SecondoRecente are the buttons for the recent files...
Code:
....
private String NomeFile;
.....
private void Apri_Click(object sender, System.EventArgs e)
{
SecondoRecente.Text=NomeFile;
OpenFileDialog fileChooser=new OpenFileDialog();
fileChooser.Filter="tiff images (*.tiff)|*.tiff";
DialogResult result = fileChooser.ShowDialog();
//PictureBox.Image = Image.FromFile(fileChooser.FileName);
//PictureBox.Image = new Bitmap(fileChooser.FileName);
try
{
PictureBox.Image = new System.Drawing.Bitmap(fileChooser.FileName);
}
catch
{
ArgumentException eccezione = new ArgumentException();
}
PrimoRecente.Text=fileChooser.FileName;
NomeFile = fileChooser.FileName;
This is the code for the zoom i hope
Code:
private void Zoom50_Click(object sender, System.EventArgs e)
{
// PictureBox.Width = PictureBox.Width - (PictureBox.Width * 0.5);
// PictureBox.Height = PictureBox.Height - (PictureBox.Height * 0.5);
// Ridisegna();
}
private Sub Ridisegna(){
// PictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
// if ((PictureBox.Width >= theScreen.width)||(PictureBox.Height >= thscreen.height)){
// vScrollBar.Maximum = PictureBox.Height + hScrollBar.Height;
// hScrollBar.Maximum = PictureBox.Width + vScrollBar1.Width;
// panel1.Size = PictureBox.Size;
// hScrollBar.Value = 0;
// vScrollBar.Visible = True;
// hScrollBar.Visible = True;}
// else{
// vScrollBar1.Visible = False;
// hScrollBar1.Visible = False; }
// PictureBox.Ridisegna();
//
// }